﻿using System;
using System.Collections.Generic;
using System.Reflection;

namespace xycn.framework.MidwareManagement
{
    /// <summary>
    /// 中间件插件信息
    /// </summary>
    public class MidwareInfo
    {
        /// <summary>
        /// controller所在库信息
        /// </summary>
        public string fromLib = "";

        /// <summary>
        /// 所在命名空间
        /// </summary>
        public string Namespace = "";

        /// <summary>
        /// controller类名
        /// </summary>
        public string className = "";

        /// <summary>
        /// 中间件所在类的类型
        /// </summary>
        public Type midwareType = null;

        /// <summary>
        /// controller中处理http 请求的函数列表
        /// </summary>
        public List<MidwareMethodInfo> methodInfors =
            new List<MidwareMethodInfo>();
    }
    
    /// <summary>
    /// 中间件处理函数信息
    /// </summary>
    public class MidwareMethodInfo
    {
        /// <summary>
        /// 调用顺序号
        /// </summary>
        public int callSN = 0;

        /// <summary>
        /// 函数信息
        /// </summary>
        public MethodInfo methodInfor = null;

        /// <summary>
        /// 函数名
        /// </summary>
        public string Name = "";
        
    }
}
